package com.ihr360.payroll.dao;

import com.ihr360.commons.model.type.TaxRole;
import com.ihr360.payroll.model.dto.salary.basecode.SalaryTaxType;
import com.ihr360.payroll.model.dto.salary.basecode.TaxDivision;
import com.ihr360.payroll.model.dto.salary.tax.SalaryTaxTable;
import com.ihr360.rest.reposity.SimpleRestReposity;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

import java.util.List;

/**
 * @author richey
 */
@RepositoryRestResource
public interface SalaryTaxTableRepository extends SimpleRestReposity<SalaryTaxTable, Long>, PagingAndSortingRepository<SalaryTaxTable, Long> {
    List<SalaryTaxTable> findByEnabled(@Param("enabled") Boolean enabled);

    SalaryTaxTable findByTaxRoleAndDivisionAndTypeAndEnabled(TaxRole aNative, TaxDivision taxDivision, SalaryTaxType salaryTaxType, boolean b);
}
